<rss version="2.0" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
    <channel>
        <title>Global Internet Business Solutions ~ GIBS</title> 
        <link>https://gibs.com</link> 
        <description>RSS feeds for Global Internet Business Solutions ~ GIBS</description> 
        <ttl>60</ttl> <item>
    <comments>https://gibs.com/Support/Knowledge-Base/ID/100/Initializing_a_NotificationController_in_DNN_9#Comments</comments> 
    <slash:comments>0</slash:comments> 
    <wfw:commentRss>https://gibs.com/DesktopModules/DnnForge%20-%20NewsArticles/RssComments.aspx?TabID=51&amp;ModuleID=411&amp;ArticleID=100</wfw:commentRss> 
    <trackback:ping>https://gibs.com:443/DesktopModules/DnnForge%20-%20NewsArticles/Tracking/Trackback.aspx?ArticleID=100&amp;PortalID=0&amp;TabID=51</trackback:ping> 
    <title>Initializing a NotificationController in DNN 9</title> 
    <link>https://gibs.com/Support/Knowledge-Base/ID/100/Initializing_a_NotificationController_in_DNN_9</link> 
    <description>You can use NotificationsController.Instance.SendNotification method to send notifications.

Here is an example:

&amp;nbsp;


        public void AddHtmlNotification(string subject, string body)
        {
           
            UserInfo _currentUser = DotNetNuke.Entities.Users.UserController.GetUserById(this.PortalId, PortalSettings.AdministratorId);
            var notificationType = NotificationsController.Instance.GetNotificationType(&amp;quot;HtmlNotification&amp;quot;);
            // NEED THE PORTALID HERE AND AGENTID
            var sender = UserController.GetUserById(this.PortalId, this.UserId);
            var notification = new Notification { NotificationTypeID = notificationType.NotificationTypeId, Subject = subject, Body = body, IncludeDismissAction = true, SenderUserID = sender.UserID };
            NotificationsController.Instance.SendNotification(notification, this.PortalId, null, new List { _currentUser });
        }

&amp;nbsp;
</description> 
    <dc:creator></dc:creator> 
    <pubDate>Wed, 21 Oct 2020 11:28:00 GMT</pubDate> 
    <guid isPermaLink="false">f1397696-738c-4295-afcd-943feb885714:100</guid> 
    
</item>

    </channel>
</rss>